<%@ page language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>JavaMail</title>
<!--
<meta http-equiv="Content-Type" content="text/html; charset=UTF8">
-->
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>


<Script language="javascript">

function check(){

	if(document.javamailform.fromaddr.value == ""){
        alert("請輸入寄件人 E-Mail！");
        return false;
    }

	if(document.javamailform.toaddr.value == ""){
        alert("請輸入收件人 E-Mail！");
        return false;
    }

}

</Script>
</head>

<body>

<form name='javamailform' method="post" action="javaMailProcess.jsp">

<table border="1">

    <tr>
        <td bgcolor="#6633FF">
            <div align="center" class="style1">
                <div align="left">寄件人 E-Mail</div>
            </div>
        </td>
        <td><input name="fromaddr" type="text" id="fromaddr" size="40"></td>

        <td bgcolor="#6633FF">
            <div align="center" class="style1">
                <div align="left">寄件人顯示名稱</div>
            </div>
        </td>
        <td><input name="fromaddrname" type="text" id="fromaddrname" size="12"></td>
    </tr>

    <tr>
        <td bgcolor="#6633FF">
            <div align="center" class="style1">
                <div align="left">收件人 E-Mail</div>
            </div>
        </td>
        <td><input name="toaddr" type="text" id="toaddr" size="40"></td>

        <td bgcolor="#6633FF">
            <div align="center" class="style1">
                <div align="left">收件人顯示名稱</div>
            </div>
        </td>
        <td><input name="toaddrname" type="text" id="toaddrname" size="12"></td>
    </tr>

    <tr>
        <td bgcolor="#6633FF">
            <div align="center" class="style1">
                <div align="left">信件主旨</div>
            </div>
        </td>
        <td colspan="3"><input name="subject" type="text" id="subject" size="71"></td>
    </tr>

    <tr>
        <td bgcolor="#6633FF">
            <div align="center" class="style1">
                <div align="left">本文內容</div>
            </div>
        </td>
        <td colspan="3"><textarea rows="10" cols="70" name="msgbody" id="msgbody"></textarea></td>
    </tr>

    <tr bgcolor="#33CC66">
        <td colspan='6' align='center'>
            <input type='submit' value='確定' onClick="return check()">
        </td>
    </tr>

</table>

</form>

</body>
</html>
